<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>商家管理</title>
    <link rel="stylesheet" href="../css/style.css">
    <link rel="stylesheet" href="../css/seller.css">
</head>
<body>
    <nav class="nav-bar">
        <div class="nav-brand">购物系统 - 商家管理</div>
        <ul class="nav-menu">
            <li><a href="index.html" class="active">商品管理</a></li>
            <li><a href="orders.html">订单管理</a></li>
            <li><a href="#" id="logout">退出登录</a></li>
        </ul>
    </nav>
    
    <div class="container">
        <div class="product-management">
            <div class="header-actions">
                <h2>商品管理</h2>
                <button id="addProductBtn" class="primary-btn">添加商品</button>
            </div>
            <div id="productList" class="product-grid">
                <!-- 商品列表将通过JavaScript动态加载 -->
            </div>
        </div>
    </div>

    <!-- 添加/编辑商品的模态框 -->
    <div id="productModal" class="modal">
        <div class="modal-content">
            <h3 id="modalTitle">添加商品</h3>
            <form id="productForm">
                <input type="hidden" id="commodityId">
                <div class="form-group">
                    <label for="commodityName">商品名称</label>
                    <input type="text" id="commodityName" required>
                </div>
                <div class="form-group">
                    <label for="price">价格</label>
                    <input type="number" id="price" step="0.01" min="0" required>
                </div>
                <div class="form-group">
                    <label for="stock">库存</label>
                    <input type="number" id="stock" min="0" required>
                </div>
                <div class="form-actions">
                    <button type="button" class="secondary-btn" onclick="closeModal()">取消</button>
                    <button type="submit" class="primary-btn">保存</button>
                </div>
            </form>
        </div>
    </div>

    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="../js/seller/index.js"></script>
</body>
</html> 